package com.example.tse.rbhttpservice.service.shopping.model;

import java.util.List;
import java.util.ArrayList;
import com.example.tse.rbhttpservice.service.RudderResponse;


//import com.rbyair.services.shopping.model.ShoppingGetRecommendList;
/**
 * 购物车中没有商品时显示“为我推荐”商品，购物成功或失败提示页也有
 * @author wliu
 * edit tse
 */
public class ShoppingGetRecommendListResponse extends RudderResponse{
    
    private List<ShoppingGetRecommendList> getRecommendList = new ArrayList<ShoppingGetRecommendList>();
		
	
    /**
     * @return getRecommendList
     */	
    public List<ShoppingGetRecommendList> getGetRecommendList() { 
	    return this.getRecommendList;
    };
	
	/**
     * @return getRecommendList
     */	
    public void setGetRecommendList(List<ShoppingGetRecommendList> getRecommendList) { 
        this.getRecommendList = getRecommendList;
    };
    
	
        
    private static void filterFor(ShoppingGetRecommendList shopping) {
        if (shopping.getProductId() == null) {
            shopping.setProductId("");
        }
        if (shopping.getName() == null) {
            shopping.setName("");
        }
        if (shopping.getThumbnailPic() == null) {
            shopping.setThumbnailPic("");
        }
        if (shopping.getPrice() == null) {
            shopping.setPrice("");
        }
        if (shopping.getBuyerNum() == null) {
            shopping.setBuyerNum("");
        }
        if (shopping.getStoreNum() == null) {
            shopping.setStoreNum("");
        }
    }
        
    public static void filter(ShoppingGetRecommendListResponse shopping) {
        if (shopping.getGetRecommendList() == null) {
            shopping.setGetRecommendList(new ArrayList<ShoppingGetRecommendList>());
        } else {
            for (ShoppingGetRecommendList item : shopping.getGetRecommendList()) {
                filterFor(item);
            }
        }
    }
}
